package com.ktjy.test1;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * @author:雷淑娥
 * @Date:2024/12/11 17:12
 * version:1.0
 */
public class LogTest extends LogExtend{
    public static void main(String[] args) {
        LogTest logTest = new LogTest();
//        Method[] methods =LogTest.class.getDeclaredMethods();
        LogExtend log= LogFactory.crate(logTest);
        log.testMethod1();
        log.testMethod2();
    }
//    @Log
    @Override
    public void testMethod1() {
        try {
            Thread.sleep(100);//模式方法执行时间
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        System.out.println("Executing testMethod");

    }
//    @Log
    @Override
    public void testMethod2() {
        try {
            Thread.sleep(150);//模式方法执行时间
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        System.out.println("Executing testMethod");

    }
}
